From 12a03a9a72f7895d571dbaeeb245d92aa277a610 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 6 Oct 2023 17:48:03 +0200
Subject: refactor(components): merge HeadingButton and Widget components

The HeadingButton component was only used inside Widget component and
it is not very useful on its own so I merge the two components in a
new Collapsible component.
---
 src/pages/blog/page/[number].tsx | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

(limited to 'src/pages/blog/page/[number].tsx')

diff --git a/src/pages/blog/page/[number].tsx b/src/pages/blog/page/[number].tsx
index b63fa9b..15d7245 100644
--- a/src/pages/blog/page/[number].tsx
+++ b/src/pages/blog/page/[number].tsx
@@ -7,6 +7,7 @@ import Script from 'next/script';
 import { useIntl } from 'react-intl';
 import {
   getLayout,
+  Heading,
   LinksListWidget,
   PageLayout,
   PostsList,
@@ -157,24 +158,30 @@ const BlogPage: NextPageWithLayout<BlogPageProps> = ({
         headerMeta={{ total: totalArticles }}
         widgets={[
           <LinksListWidget
-            // eslint-disable-next-line react/jsx-no-literals -- Key allowed
-            key="thematics-list"
+            heading={
+              <Heading isFake level={3}>
+                {thematicsListTitle}
+              </Heading>
+            }
             items={getLinksListItems(
               thematicsList.map((thematic) =>
                 getPageLinkFromRawData(thematic, 'thematic')
               )
             )}
-            title={thematicsListTitle}
-            level={2}
+            // eslint-disable-next-line react/jsx-no-literals -- Key allowed
+            key="thematics-list"
           />,
           <LinksListWidget
-            // eslint-disable-next-line react/jsx-no-literals -- Key allowed
-            key="topics-list"
+            heading={
+              <Heading isFake level={3}>
+                {topicsListTitle}
+              </Heading>
+            }
             items={getLinksListItems(
               topicsList.map((topic) => getPageLinkFromRawData(topic, 'topic'))
             )}
-            title={topicsListTitle}
-            level={2}
+            // eslint-disable-next-line react/jsx-no-literals -- Key allowed
+            key="topics-list"
           />,
         ]}
       >
-- 
cgit v1.2.3

